

//
//  BZBView.m
//  1243
//
//  Created by apple on 16/7/12.
//  Copyright © 2016年 1243. All rights reserved.
//
#define WIDTH [[UIScreen mainScreen] bounds].size.width
#define HEIGHT [[UIScreen mainScreen] bounds].size.height
#import "BZBView.h"

@implementation BZBView


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.topImg = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 115)];
        self.topImg.backgroundColor = [UIColor whiteColor];
        
        
        self.blackView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 115)];
        self.blackView.backgroundColor = [UIColor blackColor];
        self.blackView.alpha = 0.44;
        
        
        self.headImg = [[UIImageView alloc]initWithFrame:CGRectMake(10, 115 - 60, 50, 50)];
        self.headImg.backgroundColor = [UIColor orangeColor];
        
        self.titleLB = [[UILabel alloc]initWithFrame:CGRectMake(70, 115 - 50, 100, 25)];
        self.titleLB.textColor = [UIColor whiteColor];
        self.titleLB.font =[UIFont systemFontOfSize:18];
        
        self.localImg = [[UIImageView alloc]initWithFrame:CGRectMake(70, 115 - 25, 20, 20)];
//        self.localImg.backgroundColor = [UIColor redColor];
        
        self.localLB = [[UILabel alloc]initWithFrame:CGRectMake(100, 115 - 25, 100, 20)];
        self.localLB.userInteractionEnabled = YES;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(LocalAction:)];
        [self.localLB addGestureRecognizer:tap];
        self.localLB.textColor = [UIColor whiteColor];
        self.localLB.font =[UIFont systemFontOfSize:15];
        
        self.jiantouImg = [[UIImageView alloc]initWithFrame:CGRectMake(210, 115 - 25, 30, 20)];
//        self.jiantouImg.backgroundColor = [UIColor greenColor];
        
        
        [self addSubview:self.topImg];
        [self.topImg addSubview:self.blackView];
        [self addSubview:self.headImg];
        [self addSubview:self.titleLB];
        [self addSubview:self.localImg];
        [self addSubview:self.localLB];
        [self addSubview:self.jiantouImg];
        
    }
    return self;
}

-(void)LocalAction:(id)sender {
    if (self.LocalBlock) {
        self.LocalBlock();
    }
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
